# coding:utf-8

"""
image_loader
Created on 2016/12/7 16:07
@author: GuoYufu
@group : OceanHorn
@contact: OceanHorn@163.com
"""

from scipy.io import loadmat as load

class Image_loader:

    @classmethod
    def load_image_set(cls, image_set_name):
        set_name = "./data/" + image_set_name + ".mat"
        image_set = load(set_name)
        return  image_set

    @classmethod
    def load_samples_and_labels(cls, image_set_name):
        image_set = Image_loader.load_image_set(image_set_name)
        samples = image_set["X"]
        labels = image_set["y"]

        return samples, labels




if __name__ == "__main__":
    samples, labels = Image_loader.load_samples_and_labels("test_32x32")
    print type(samples)
    print type(labels)